package com.quz.jn_travel.service.impi;

import com.quz.jn_travel.mapper.BannerMapper;
import com.quz.jn_travel.pojo.Banner;
import com.quz.jn_travel.pojo.BannerExample;
import com.quz.jn_travel.service.BannerService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class BannerServiceImpi implements BannerService {
    @Resource
    BannerMapper bannerMapper;

    @Override
    public List<Banner> getShowBanner() {
        BannerExample bannerExample = new BannerExample();
        BannerExample.Criteria criteria = bannerExample.createCriteria();
        criteria.andIsShowEqualTo(1);
        List<Banner> banners = bannerMapper.selectByExample(bannerExample);
        return banners;
    }
}
